﻿using Basic.FlowCollect;
using Basic.FlowLocalEvent.Model;
using Basic.FlowModel.DB;
using Basic.FlowRemoteModel.NodeRoute.Model;
using Basic.FlowService.Interface;

namespace Basic.FlowService.lmpl
{
    internal class FlowNodeRouteService : IFlowNodeRouteService
    {
        private readonly INodeRouteCollect _Service;

        public FlowNodeRouteService ( INodeRouteCollect service )
        {
            this._Service = service;
        }
        public void Delete ( long id )
        {
            DBFlowNodeRoute db = this._Service.Get(id);
            this._Service.Delete(db);
            new FlowNodeRouteEvent(db).AsyncSend("Delete");
        }
        public long Add ( RouteAdd data )
        {
            return this._Service.Add(data);
        }
    }
}
